package com.stox.client.ui.javafx.watchlist.view;

import com.stox.client.ui.javafx.watchlist.model.OWatchlist;
import com.stox.client.ui.javafx.watchlist.widget.WatchlistComboBox;
import com.stox.shared.watchlist.model.Watchlist;

public class AddWatchlistConfigurationView extends
		EditWatchlistConfigurationView {

	public AddWatchlistConfigurationView(WatchlistComboBox watchlistComboBox) {
		super(watchlistComboBox);
	}
	
	@Override
	protected void populateView() {
		//No op
	}
	
	@Override
	protected void populateModel() {
		setWatchlist(new OWatchlist(new Watchlist()));
		super.populateModel();
	}

	@Override
	protected void updateWatchlistComboBox() {
		getWatchlistComboBox().getItems().add(0, getWatchlist());
		getWatchlistComboBox().getSelectionModel().select(0);
	}
	
}
